<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">广告管理 | 新增广告</h3>
                <div class="actions pull-right">
                </div>
            </div>
            <div class="panel-body">
                <div class="form-horizontal form-border">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">标题</label>
                        <div class="col-sm-6">
                            <input id="adTitle" type="text" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">链接地址</label>
                        <div class="col-sm-6">
                            <input id="adUrl" type="url" class="form-control " name="input10" id="input10" required="" placeholder="URL、以http或https开头">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">广告展示位置</label>
                        <div class="col-sm-6">
                            <!--<input type="text" class="form-control">-->
                            <select class="form-control input-sm" id="adLocation">
                                <option value="1">首页轮播</option>
                                <option value="2">历史页</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">失效时间</label>
                        <div class="col-sm-6">
                            <input id="adEndTime" type="text" class="form-control" placeholder="失效时间为空表示永不失效">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="uploadFile" class="col-sm-3 control-label">广告图片</label>
                        <div class="col-sm-6">
                            <input type="file" name="uploadFile" id="uploadFile"">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label" ></label>
                        <div class="col-sm-10">
                            <div id="editor-trigger"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-8 col-sm-10">
                    <button type="submit" id="submitAdBtn" class="btn btn-primary">确定</button>
                    <button type="submit" class="btn btn-primary">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    var editor = new wangEditor('editor-trigger');

    // 上传图片
    editor.config.uploadImgUrl = '/upload';
    editor.config.uploadParams = {
        // token1: 'abcde',
        // token2: '12345'
    };
    editor.config.uploadHeaders = {
        // 'Accept' : 'text/x-json'
    }
    // editor.config.uploadImgFileName = 'myFileName';

    // 隐藏网络图片
    // editor.config.hideLinkImg = true;

    // 表情显示项
    editor.config.emotionsShow = 'value';


    // onchange 事件
    editor.onchange = function () {
        console.log(this.$txt.html());
    };

    editor.create();

</script>
<script src="/shop/assets/js/ajaxfileupload.js"></script>
<script src="/shop/ad/adveretisement.js"></script>
<!--</body>
</html>
-->